<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta charset="utf-8">
<title>会员表</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../../res/css/layui.css" media="all">
<link rel="stylesheet" href="../../res/css/cst/snproduction.css" media="all">
<script type="text/javascript" src="../../res/js/jquery-1.11.2.min.js"></script>
<style type="text/css">
	#arrr{
		margin-bottom: 30px;
	}
</style>
</head>
<body>

	<div class="demoTable" style="margin-left: 20px; margin-top: 10px;">
		搜索会员名称:
		<div class="layui-inline">
			<input class="layui-input" style="height: 32px;" id="meName"
				autocomplete="off" maxlength="10" placeholder="请输入会员名称">
		</div>

		<button class="layui-btn layui-btn-sm" data-type="reload"
			id="selectButton">搜索</button>
		<button class="layui-btn  layui-btn-sm" id="insert">增加</button>
	</div>

	<table class="layui-table"
		lay-data="{ url:'../../member/findAll.action', page:true, id:'idTest'}"
		lay-filter="demo">
		<thead>
			<tr>
				<th lay-data="{field:'meId',sort: true, align:'center',width:'150'}">会员编号</th>
				<th lay-data="{field:'meName',sort: true, align:'center',width:'150'}">会员名称</th>
				<th lay-data="{field:'mePwd',sort: true, align:'center',width:'150'}">会员密码</th>
				<th lay-data="{field:'meSex',align:'center',width:'130',templet:'#isSex'}">会员性别</th>
				<th lay-data="{field:'mePhone',align:'center',width:'150'}">会员电话</th>
				<th lay-data="{field:'meImage', align:'center',width:'135',sort: true,toolbar: '#Image'}">用户头像</th>
				<th lay-data="{field:'meEmail', align:'center',width:'150'}">会员邮箱</th>
				<th lay-data="{field:'meDiscount', align:'center',width:'150',templet:'#isLv'}">会员等级</th>
				<th lay-data="{fixed: 'right',fixed: 'right',width:'190', align:'center', toolbar: '#barDemo'}">操作</th>
			</tr>
		</thead>
	</table>

<script type="text/javascript" id="isSex">
	 {{# if(d.meSex == 1) { }}
     <div>男</div>
 	 {{# } else if(d.meSex == 2){ }}
    <div>女</div>
	{{# }}}
</script>

<script type="text/javascript" id="isLv">
	 {{# if(d.meDiscount == 1) { }}
     <div>普通会员</div>
 	 {{# } else if(d.meDiscount == 2){ }}
    <div>高级会员</div>
    {{# } else if(d.meDiscount == 3){ }}
    <div>超级会员</div>
	{{# }}}
</script>

<script type="textml" id="Image">
    <img style="width:30px;height:30px;" src="../../{{ d.meImage }}">
</script>

<script type="text/html" id="barDemo">
     <button class="layui-btn layui-btn-xs" lay-event="edit">编辑</button>
	 <button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</button>
</script>

	<!-- 增加或修改的弹框 -->
	<div id="addOrUpdate" style="display: none;">
		<form id="myform" action="../../member/addorUpdate.action" class="layui-form" method="post"
			style="margin-top: 10px;" enctype="multipart/form-data">
			<input type="hidden" name="meId" id="meId" />
			<div class="aru">
				<label class="layui-form-label">会员名称:</label>
				<div class="layui-input-block">
					<input name="meName" id="meNames" maxlength="5" class="layui-input"
						placeholder="请输入会员名称" onblur="findCiSales()" type="text">
						<input type="hidden"  class="fromYz" id="meNameYz">
				</div>
			</div>

			<div class="aru">
				<label class="layui-form-label">会员密码:</label>
				<div class="layui-input-block">
					<input name="mePwd" id="mePwd" class="layui-input" maxlength="10" type="text"
						placeholder="请输入会员密码" onblur="findmePwd()" lay-verify="mePwd" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')">
				</div>
			</div>

			<div class="aru">
				<label class="layui-form-label">会员电话:</label>
				<div class="layui-input-block">
					<input name="mePhone" id="mePhone" maxlength="11" class="layui-input" type="text"
						placeholder="请输入会员电话" onblur="findmePhone()" onkeyup="this.value=this.value.replace(/\D/g,'')">
				</div>
			</div>
			
			<div class="aru">
				<label class="layui-form-label">会员邮箱:</label>
				<div class="layui-input-block">
					<input name="meEmail" id="meEmail" class="layui-input" type="text"
						placeholder="请输入会员邮箱">
				</div>
			</div>
			
			<div class="aru">
				<label class="layui-form-label">会员性别:</label>
				<div class="layui-input-block">
			      <input type="radio" name="meSex" id="meSex"  value="1" title="男" checked="">
			      <input type="radio" name="meSex" id="meSex"  value="2" title="女">
			    </div>
			</div>
	
			<div class="aru" class="layui-form-item">
				<label class="layui-form-label">会员等级:</label>
				<div class="layui-input-block">
					<input type="radio" name="meDiscount" id="meDiscount"  value="1" title="普通会员" checked="">
			   	    <input type="radio" name="meDiscount" id="meDiscount"  value="2" title="高级会员">
			   	    <input type="radio" name="meDiscount" id="meDiscount"  value="3" title="超级会员">
				</div>
			</div>
			
			<div class="aru">
			  <label class="layui-form-label">会员头像:</label>
			  <input type="button" class="layui-btn" id="meImage" lay-verify="meImage" name="file" value="上传图片">
			  <span id="FileName"></span>
			  <img class="layui-upload-img" id="img" src="" name="img" style="width:30px;height:30px;">
			</div>

			<div class="aru" id='arrr'>
				<div class="layui-input-block">
					<input type="button" onclick="FromSubmit();" class="layui-btn"  value="确认提交"/> <a
						href="javascript:exit();" class="layui-btn layui-btn-danger">关闭</a>
				</div>
			</div>
		</form>
	</div>
	<script src="../../res/layui.all.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../res/js/zh/snmember.js"></script>
</body>
</html>